import request from '@/utils/request'

// 查询【请填写功能名称】列表
export function listSetting(query) {
  return request({
    url: '/system/setting/list',
    method: 'get',
    params: query
  })
}

// 查询【请填写功能名称】详细
export function getSetting(slaId) {
  return request({
    url: '/system/setting/' + slaId,
    method: 'get'
  })
}

// 新增【请填写功能名称】
export function addSetting(data) {
  return request({
    url: '/system/setting',
    method: 'post',
    data: data
  })
}

// 修改【请填写功能名称】
export function updateSetting(data) {
  return request({
    url: '/system/setting',
    method: 'put',
    data: data
  })
}

// 删除【请填写功能名称】
export function delSetting(slaId) {
  return request({
    url: '/system/setting/' + slaId,
    method: 'delete'
  })
}


// 查询人员排班列表
export function scheduleList(query) {
  return request({
    url: 'system/schedule/list',
    method: 'get',
    params: query
  })
}

// 新增人员排班
export function addSchedule(data) {
  return request({
    url: '/system/schedule',
    method: 'post',
    data: data
  })
}

// 修改人员排班
export function putSchedule(data) {
  return request({
    url: '/system/schedule',
    method: 'put',
    data: data
  })
}

// 查询排班日历
export function detailList(query) {
  return request({
    url: 'system/detail/list',
    method: 'get',
    params: query
  })
}


// 修改人员排班
export function putDetail(data) {
  return request({
    url: '/system/detail',
    method: 'put',
    data: data
  })
}



// 查询公共设施列表
export function facilityList(query) {
  return request({
    url: '/system/facility/list',
    method: 'get',
    params: query
  })
}


// 新增公共设施
export function addFacility(data) {
  return request({
    url: '/system/facility',
    method: 'post',
    data: data
  })
}

// 修改公共设施
export function putFacility(data) {
  return request({
    url: '/system/facility',
    method: 'PUT',
    data: data
  })
}

// 删除公共设施
export function delSettingFacilityIds(facilityIds) {
  return request({
    url: '/system/facility/' + facilityIds,
    method: 'delete'
  })
}

// 查询房间列表
export function getRoomList(query) {
  return request({
    url: "/system/room/list",
    method: "post",
    data: query,
  })
}

// 新增房间
export function addRoom(data) {
  return request({
    url: '/system/room',
    method: 'post',
    data: data
  })
}


// 修改房间
export function putRoom(data) {
  return request({
    url: '/system/room',
    method: 'PUT',
    data: data
  })
}

// 删除房间
export function delSettingroom(roomIds) {
  return request({
    url: '/system/room/' + roomIds,
    method: 'delete'
  })
}

// 查询楼栋树
export function getFloorList(query) {
  return request({
    url: '/system/building/buildingListTree',
    method: 'get',
    params: query
  })
}

// 新增楼栋
export function addBuilding(data) {
  return request({
    url: '/system/building',
    method: 'post',
    data: data
  })
}

// 修改楼栋
export function putBuilding(data) {
  return request({
    url: '/system/building',
    method: 'PUT',
    data: data
  })
}

// 删除楼栋
export function deleteBuilding(buildingIds) {
  return request({
    url: '/system/building/' + buildingIds,
    method: 'delete'
  })
}

// 新增楼层
export function addFloor(data) {
  return request({
    url: '/system/floor',
    method: 'post',
    data: data
  })
}


// 修改楼层
export function putFloor(data) {
  return request({
    url: '/system/floor',
    method: 'PUT',
    data: data
  })
}

// 删除楼层
export function delSettingFloor(floorIds) {
  return request({
    url: '/system/floor/' + floorIds,
    method: 'delete'
  })
}
// 获取区域类型
export function getSectionType(query) {
  return request({
    url: '/system/room/sectionType',
    method: 'get',
    params: query
  })
}
